

package com.kimo.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kimo.shop.bean.model.ProdProp;
import com.kimo.shop.common.util.PageAdapter;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProdPropMapper extends BaseMapper<ProdProp> {

    List<ProdProp> listPropAndValue(@Param("adapter") PageAdapter adapter, @Param("prodProp") ProdProp prodProp);

    long countPropAndValue(@Param("prodProp") ProdProp prodProp);

    int deleteByPropId(@Param("propId") Long propId, @Param("rule") Integer rule, @Param("shopId") Long shopId);

    List<ProdProp> listByCategoryId(Long categoryId);

    List<ProdProp> getProdPropByPropNameAndShopId(@Param("propName") String propName,
                                                  @Param("propNameEn") String propNameEn,
                                                  @Param("shopId") Long shopId,
                                                  @Param("rule") Integer rule);

    List<ProdProp> listByLang(@Param("prodProp") ProdProp prodProp);

}
